package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;

/**
 * 
 * @TableName herbal_prescription_detail
 */
@TableName(value ="herbal_prescription_detail")
public class HerbalPrescriptionDetail {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Herbal prescription ID
     */
    @TableField(value = "prescription_id")
    private Integer prescriptionId;

    /**
     * Herbal ID
     */
    @TableField(value = "herbal_id")
    private Integer herbalId;

    /**
     * Dosage
     */
    @TableField(value = "dosage")
    private String dosage;

    /**
     * Unit price
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * Footnote
     */
    @TableField(value = "footnote")
    private String footnote;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Herbal prescription ID
     */
    public Integer getPrescriptionId() {
        return prescriptionId;
    }

    /**
     * Herbal prescription ID
     */
    public void setPrescriptionId(Integer prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    /**
     * Herbal ID
     */
    public Integer getHerbalId() {
        return herbalId;
    }

    /**
     * Herbal ID
     */
    public void setHerbalId(Integer herbalId) {
        this.herbalId = herbalId;
    }

    /**
     * Dosage
     */
    public String getDosage() {
        return dosage;
    }

    /**
     * Dosage
     */
    public void setDosage(String dosage) {
        this.dosage = dosage;
    }

    /**
     * Unit price
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * Unit price
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * Footnote
     */
    public String getFootnote() {
        return footnote;
    }

    /**
     * Footnote
     */
    public void setFootnote(String footnote) {
        this.footnote = footnote;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HerbalPrescriptionDetail other = (HerbalPrescriptionDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPrescriptionId() == null ? other.getPrescriptionId() == null : this.getPrescriptionId().equals(other.getPrescriptionId()))
            && (this.getHerbalId() == null ? other.getHerbalId() == null : this.getHerbalId().equals(other.getHerbalId()))
            && (this.getDosage() == null ? other.getDosage() == null : this.getDosage().equals(other.getDosage()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getFootnote() == null ? other.getFootnote() == null : this.getFootnote().equals(other.getFootnote()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPrescriptionId() == null) ? 0 : getPrescriptionId().hashCode());
        result = prime * result + ((getHerbalId() == null) ? 0 : getHerbalId().hashCode());
        result = prime * result + ((getDosage() == null) ? 0 : getDosage().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getFootnote() == null) ? 0 : getFootnote().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", prescriptionId=").append(prescriptionId);
        sb.append(", herbalId=").append(herbalId);
        sb.append(", dosage=").append(dosage);
        sb.append(", price=").append(price);
        sb.append(", footnote=").append(footnote);
        sb.append("]");
        return sb.toString();
    }
}